<select id="findby${objName}" resultMap="AllColumnMap">
    select
    <include refid="all_column"/>
    from ${tableName}
    <where>
<#list fields as field>
    <if test="pojo.${field.entityField} != null">AND `${field.tableField}` = ${r'#{pojo.'}${field.entityField} </if>
</#list>
    </where>
</select>